CMD_1=hello
CMD_2=mongodb_test
OBJECTS_2=mongodb_test.o
CMD_3=factorial
OUTPUT_OPTION=-D_UNIX_ -g -Wall -Wno-unused-label --pipe
EFLAGS=
LDFLAGS=

all : $(CMD_1) $(CMD_2) $(CMD_3)

hello : hello.entity ../libs/entity/Basic_types.entity ../libs/entity/Localization.entity ../libs/entity/Stream.entity ../ec/ec
	../ec/ec -c hello.entity
	llc hello.ll
	gcc hello.s -g -o hello

$(CMD_2) : $(OBJECTS_2)
	$(CXX) -o $(CMD_2) $(LDFLAGS) $(OBJECTS_2) $(CHLIB) $(LIBS) $(LIBS_LOC)

mongodb_test.C : mongodb_test.entity ../libs/entity/Basic_types.entity ../libs/entity/Localization.entity ../libs/entity/Stream.entity ../libs/entity/Thread.entity ../libs/entity/Socket.entity
	../entity/Entity_new -c mongodb_test.entity

factorial : factorial.entity ../libs/entity/Basic_types.entity ../libs/entity/Localization.entity ../libs/entity/Stream.entity ../ec/ec
	../ec/ec -c factorial.entity
	llc factorial.ll
	gcc factorial.s -g -o factorial

clean :
	rm -f $(CMD_1)
	rm -f $(CMD_2) $(OBJECTS_2) mongodb_test.C
	rm -f $(CMD_3)
	rm -f core core.* *.ll *.s
